<section class="previous-classes">
    <div class="row">
        <div class="container">
            <div class="col-lg-12 column12">
                <div class="row">
                    <div class="previous-head">
                        <span>Previously</span> taught classes<a href="<?php echo $this->createAbsoluteUrl('/users/previousclasses', array('authKey' => $authKey)); ?>">See all</a>
                    </div>
                </div>
                <div class="row">
                    <div id="owl-classes" class="owl-carousel owl-theme">
                        <?php
                        $emptyImage = '<img src="' . getWorkNoshopimage(SkillConfig::skill_literallyending_like_classe_slider) . '" class="img-responsive">';
                        foreach ($priviousClasses as $priviousClasse) {
                            if (!empty($priviousClasse['classes_id'])) {
                                $imageName = ClassImage::getPrimaryImage($priviousClasse['classes_id']);
                                $courseName = $priviousClasse['class_titile'];
                                $userDetails = getUserTypeByClassCourse('Classes', $priviousClasse['classes_id']);
                                $imagePath = getImagePathByClassCourse('Classes', $priviousClasse['classes_id']);
                                $url = $this->createAbsoluteUrl('/workshop-'.$priviousClasse['classes_id'].'/'.$priviousClasse['class_seo_title']);
                            } else {
                                $imageName = ClassImage::getCoursesPrimaryImage($priviousClasse['courses_id']);
                                $courseName = $priviousClasse['course_titile'];
                                $userDetails = getUserTypeByClassCourse('Courses', $priviousClasse['courses_id']);
                                $imagePath = getImagePathByClassCourse('Courses', $priviousClasse['courses_id']);
                                $url = $this->createAbsoluteUrl('/courses-'.$priviousClasse['courses_id'].'/'.$priviousClasse['course_seo_title']);
                            }
                            ?>
                            <div class="prev-class">
                                <div class="title-span">
                                    <a href="<?php echo $url; ?>">
                                        <?php echo (!empty($imageName)) ? '<img src="' . getRequestbaseUrl() . getuploadFolderDir() . SkillConfig::getClassCourseImagePath($imagePath) . '240X180/' . $imageName . '" class="img-responsive" alt="' . $courseName . '">' : $emptyImage; ?> 
                                        <span><?php echo substrclasscourname($courseName); ?><small>By  <?php echo substr($userDetails->first_name . '  ' . $userDetails->last_name, 0, 30); ?></small></span>
                                    </a>
                                </div>
                            </div><!--prev class end here-->
                        <?php }
                        ?>

                    </div><!--===slider end here-->
                    <div class="gap"></div>
                    <div class="customNavigation">
                        <a class="prev7">Previous</a>
                        <a class="next7">Next</a>
                    </div>
                </div>
            </div><!--col-->
        </div><!--container-->
    </div><!--row -->

</section>
